<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>头部</title>
	<link rel="stylesheet"  type="text/css" href="css/style.css" />
</head>
<body>
<div  class="head">
	<div class="head_1000"><span class="box">您好, 欢迎来龙威带你飞!今天是:<span id="showTime"></span></span>                                                              <span class="aaa">
		<a href="http://localhost:8083/html/login.html" target="_Blank">登录 </a>|
		<a href="http://localhost:8083/html/register.html" target="_Blank"> 注册</a> |
		<a href="http://localhost:8083/html/login.html"target="_Blank"> 退出 </a>|
		<a href="http://localhost:8083/html/help.html" target="_Blank"> 帮助中心</a> |
		<a href="http://localhost:8083/html/front/center.html" target="_Blank"> 个人中心</a>
	</span>
	</div>
</div>
</body>
<script type="text/javascript">
	let myClock = setInterval(function() {
		var date = new Date();
		//date.getDay()拿到的值是阿拉伯数字，将他换成汉字
		var week = date.getDay()
		switch (week) {
			case 1:
				week = "星期一"
				break;
			case 2:
				week = "星期二"
				break;
			case 3:
				week = "星期三"
				break;
			case 4:
				week = "星期四"
				break;
			case 5:
				week = "星期五"
				break;
			case 6:
				week = "星期六"
				break;
			case 0:
				week = "星期日"
				break;
		}
		// 时间没有在此处一次性组合完毕是为了方便在 输出时美化
		// 组合年月日
		let ymd = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
		// 组合时分秒
		let hms = date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();

		document.getElementById("showTime").innerHTML = ymd + "&nbsp;&nbsp;" + week + "&nbsp;&nbsp; " + hms;
	}, 1000)

</script>
</html>
